@import "../../themes/ionic.globals.wp";

// Windows Label
// --------------------------------------------------

/// @prop - Text color of the label
$label-wp-text-color:                 #999 !default;

/// @prop - Text color of the label when it has focused
$label-wp-text-color-focused:         color($colors-wp, primary) !default;


// Windows Default Label
// --------------------------------------------------

.label-wp {
  margin: $item-wp-padding-top ($item-wp-padding-right / 2) $item-wp-padding-bottom 0;
}


// Windows Default Label Inside An Input/Select Item
// --------------------------------------------------

.item-input .label-wp,
.item-select .label-wp,
.item-datetime .label-wp {
  color: $label-wp-text-color;
}


// Windows Stacked & Floating Labels
// --------------------------------------------------

.label-wp[stacked] {
  font-size: 1.2rem;
}

.label-wp[floating] {
  transform: translate3d(8px, 34px, 0);
  transform-origin: left top;
}

.label-wp[stacked],
.label-wp[floating] {
  margin-bottom: 0;
  margin-left: 0;
}

.input-has-focus .label-wp[stacked],
.input-has-focus .label-wp[floating] {
  color: $label-wp-text-color-focused;
}

.input-has-focus .label-wp[floating],
.input-has-value .label-wp[floating] {
  transform: translate3d(0, 0, 0) scale(.8);
}

.item-wp.item-label-stacked [item-right],
.item-wp.item-label-floating [item-right] {
  margin-top: $item-wp-padding-media-top + 4;
  margin-bottom: $item-wp-padding-media-top + 4;
}


// Generate Windows Label colors
// --------------------------------------------------

@each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {

  .label-wp-#{$color-name},
  .item-input .label-wp-#{$color-name},
  .item-select .label-wp-#{$color-name},
  .item-datetime .label-wp-#{$color-name} {
    color: $color-base;
  }

}
